<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Model;

class Option extends Model
{   
    protected $table = 'options';
    //
    /**
     * The attributes that are mass assignable.
     *
     * @var array
     */
    protected $fillable = [
        'name',
        'code',
        'times',
        'description',
        'rules',
        'status',
        'icon',
        'sort'
    ];

    public function status(){
        $status = ['未开启','进行中','休市中'];
        return $status[$this->status];
    }
    public function statuslabel(){
        $status = ['label-danger','label-success','label-primary '];
        return $status[$this->status];
    }

}
